libxl: use new QEMU xenstore protocol
authorWei Liu <wei.liu2@citrix.com>
Fri, 20 Mar 2015 16:19:12 +0000 (16:19 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 24 Mar 2015 15:46:04 +0000 (15:46 +0000)
commit54c2e621c5b8f9ac8f8239248957e8d1e8b7c846
tree3cb99217135d7b8b72b7e981b2d142db2b8d7a6a
parent585454fc54c9a8a2b6670f78fad21c0d932bcdef
libxl: use new QEMU xenstore protocol

Originally both QEMU traditional and QEMU upstream used hardcoded
/local/domain/0 paths. This patch changes the protocol to use
/local/domain/$dm_domid path.

For QEMU traditional and upstream without stubdom, $dm_domid is 0 so
the path is in fact still /local/domain/0.

For QEMU traditional stubdom, this is incompatible protocol change.
However QEMU traditional is shipped with Xen so we are allowed to do
such change. This change needs to work with corresponding QEMU
traditional changeset.

There is no compatibility issue with QEMU upstream stubdom, because QEMU
upstream stubdom doesn't exist yet.

Watch /local/domain/$dm_domid/device-model/$domid/state, wait until
state turns "running" then unpause guest.

LIBXL_STUBDOM_START_TIMEOUT is the timeout used wait for stubdom to be
ready. My test on a very old machine (Core 2 6400) showed that it might
need more than 20s before the stubdom is ready to serve DomU.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl_device.c
tools/libxl/libxl_dm.c
tools/libxl/libxl_dom.c
tools/libxl/libxl_internal.h
tools/libxl/libxl_pci.c